package com.eurobcoin.trading;

import java.io.Serializable;
import java.util.Locale;

import com.eurobcoin.helper.NumberHelper;

public class TradingOrder implements Serializable {

	private static final long serialVersionUID = -2975934392992101165L;

	private long price;
	
	private long amount;
	
	private long totalPrice;
	
	private int leftCurrencyDecimals;
	
	private int rightCurrencyDecimals;
	
	private Locale locale;

	public String getPriceFormatted() {
		return NumberHelper.longToDoubledString(
				this.price, 
				rightCurrencyDecimals, 
				this.locale);
	}
	
	public String getAmountFormatted() {
		return NumberHelper.longToDoubledString(
				this.amount, 
				leftCurrencyDecimals, 
				this.locale);
	}
	
	public String getTotalPriceFormatted() {
		return NumberHelper.longToDoubledString(
				this.totalPrice, 
				rightCurrencyDecimals, 
				this.locale);
	}
	
	public int getLeftCurrencyDecimals() {
		return leftCurrencyDecimals;
	}

	public void setLeftCurrencyDecimals(int leftCurrencyDecimals) {
		this.leftCurrencyDecimals = leftCurrencyDecimals;
	}

	public int getRightCurrencyDecimals() {
		return rightCurrencyDecimals;
	}

	public void setRightCurrencyDecimals(int rightCurrencyDecimals) {
		this.rightCurrencyDecimals = rightCurrencyDecimals;
	}

	public Locale getLocale() {
		return locale;
	}

	public void setLocale(Locale locale) {
		this.locale = locale;
	}

	public long getPrice() {
		return price;
	}

	public void setPrice(long price) {
		this.price = price;
	}

	public long getAmount() {
		return amount;
	}

	public void setAmount(long amount) {
		this.amount = amount;
	}

	public long getTotalPrice() {
		return totalPrice;
	}

	public void setTotalPrice(long totalPrice) {
		this.totalPrice = totalPrice;
	}
	
}
